SIMD in JavaScript via C++ and Emscripten

نویسندگان

  • Peter Jensen
  • Ivan Jibaja
  • Ningxin Hu
  • Dan Gohman
  • John McCutchan
چکیده

Emscripten, Mozilla’s C/C++ to JavaScript compiler, can be used to port existing native C/C++ applications to the Web platform. When paired with a fast JavaScript engine, the applications run at near-native speeds. However, compute intensive C/C++ applications, such as games and media-processing, making use of SIMD intrinsics or gcc style vector code cannot achieve near-native speed, because JavaScript does not have language support for expressing SIMD operations. This paper presents SIMD.JS, an evolving new JavaScript standard, enabling SIMD operations at the JavaScript language level, and extensions to Emscripten, enabling compilation of C++ programs that make use of SIMD intrinsics or gcc style vector code. An extensive subset of available C++ SIMD x86 intrinsics is supported. Using Emscripten, we show how C/C++ SIMD programs are compiled into JavaScript resulting in equivalent speedups compared to scalar code. The new powerful combination of SIMD.JS enabled JavaScript engines and Emscripten’s newly added ability to utilize the SIMD.JS primitives for it’s code generation will allow a new set of compute intensive C/C++ applications to be ported to the Web platform, thereby enabling the next leap in performance on the web platform.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

JSAI: Designing a Sound, Configurable, and Efficient Static Analyzer for JavaScript

We describe JSAI, an abstract interpreter for JavaScript. JSAI uses novel abstract domains to compute a reduced product of type inference, pointer analysis, string analysis, integer and boolean constant propagation, and control-flow analysis. In addition, JSAI allows for analysis control-flow sensitivity (i.e., context-, path-, and heap-sensitivity) to be modularly configured without requiring ...

متن کامل

A JavaScript Pitch Shifting Library for EarSketch with Asm.js

A JavaScript pitch shifting library based on asm.js was developed for the EarSketch website. EarSketch is a Web Audio API-based educational website that teaches computer science principles through music technology and composition. Students write code in Python and JavaScript to manipulate and transform audio loops in a multi-track digital audio workstation paradigm. The pitchshifting library pr...

متن کامل

Csound on the Web

This paper reports on two approaches to provide a general-purpose audio programming support for web applications based on Csound. It reviews the current state of web audio development, and discusses some previous attempts at this. We then introduce a Javascript version of Csound that has been created using the Emscripten compiler, and discuss its features and limitations. In complement to this,...

متن کامل

Verovio: A library for Engraving MEI Music Notation into SVG

Rendering symbolic music notation is a common component of many MIR applications, and many tools are available for this task. There is, however, a need for a tool that can natively render the Music Encoding Initiative (MEI) notation encodings that are increasingly used in music research projects. In this paper, we present Verovio, a library and toolkit for rendering MEI. A significant advantage...

متن کامل

Faust audio DSP language in the Web

With the advent of both HTML5 and the Web Audio API (a high-level JavaScript API for audio processing and synthesis) interesting audio applications can now be developed for the Web. The Web Audio API offers a set of fast predefined audio nodes as well as customizable ScriptProcessor node, allowing developers to add their own javascript audio processing code. Several projects are developing abst...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015